package com.gzhryc.shared_device.oem.code.member.dao.db;

import com.gzhryc.common.NumberTools;
import com.gzhryc.jdbc.annotaion.Column;
import com.gzhryc.jdbc.annotaion.DateBranchTable;
import com.gzhryc.jdbc.annotaion.Id;
import com.gzhryc.jdbc.annotaion.Table;
import com.gzhryc.jdbc.enums.DateBranchTableType;
import com.gzhryc.shared_device.base.enums.ERefundState;

import java.io.Serializable;
import java.util.Date;

/**
 * 会员充值退款订单
 * @version 2023-08-17
 */
@DateBranchTable(type = DateBranchTableType.year)
@Table(name = "member_recharge_refund_order")
public class MemberRechargeRefundOrder implements Serializable {

    private static final long serialVersionUID = 1L;

	@Id(auto = false)
    @Column(name = "trade_no",notNull = true,length = 32,note = "退款订单")
    protected String tradeNo;

    @Column(name = "transfer_trade_no",notNull = true,length = 32, note = "提现订单号")
    protected String transferTradeNo;

    @Column(name = "recharge_trade_no",notNull = true,length = 32,note = "充值订单号")
    protected String rechargeTradeNo;

    @Column(name = "member_id", notNull = true, note = "会员ID")
    protected Long memberId;

    @Column(name = "pay_type", notNull = true, note = "支付类型")
    protected Integer payType;

    @Column(name = "refund_money", notNull = true, note = "退款金额")
    protected Integer refundMoney;

    @Column(name = "refund_state", notNull = true,defVal = "1",note = "退款状态")
    protected Integer refundState;

    @Column(name = "refund_date", note = "退款时间")
    protected Date refundDate;

    @Column(name = "update_date", note = "最后一次修改时间", autoUpdateTime = true)
    protected Date updateDate;

    @Column(name = "create_date", note = "创建时间")
    protected Date createDate;

    public String getTradeNo() {
        return tradeNo;
    }

    public void setTradeNo(String tradeNo) {
        this.tradeNo = tradeNo;
    }

    public Long getMemberId() {
        return memberId;
    }

    public void setMemberId(Long memberId) {
        this.memberId = memberId;
    }

    public Integer getPayType() {
        return payType;
    }

    public void setPayType(Integer payType) {
        this.payType = payType;
    }

    public String getTransferTradeNo() {
        return transferTradeNo;
    }

    public void setTransferTradeNo(String transferTradeNo) {
        this.transferTradeNo = transferTradeNo;
    }

    public String getRechargeTradeNo() {
        return rechargeTradeNo;
    }

    public void setRechargeTradeNo(String rechargeTradeNo) {
        this.rechargeTradeNo = rechargeTradeNo;
    }

    public Integer getRefundMoney() {
        return refundMoney;
    }

    public void setRefundMoney(Integer refundMoney) {
        this.refundMoney = refundMoney;
    }

    public Integer getRefundState() {
        return refundState;
    }

    public void setRefundState(Integer refundState) {
        this.refundState = refundState;
    }

    public Date getRefundDate() {
        return refundDate;
    }

    public void setRefundDate(Date refundDate) {
        this.refundDate = refundDate;
    }

    public Date getUpdateDate() {
        return updateDate;
    }

    public void setUpdateDate(Date updateDate) {
        this.updateDate = updateDate;
    }

    public Date getCreateDate() {
        return createDate;
    }

    public void setCreateDate(Date createDate) {
        this.createDate = createDate;
    }
    
    public String getRefundMoneyStr() {
    	return NumberTools.getMoneyStr(this.refundMoney);
    }
    
    public String getRefundStateName() {
    	return ERefundState.note(this.refundState);
    }
}
